package com.ruoyi.shop.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 购物车对象 shop_user_cart
 * 
 * @author Alan Zhang
 * @date 2021-09-14
 */
public class ShopUserCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车id */
    private Long id;

    /** 购买的用户 */
    @Excel(name = "购买的用户")
    private Long userId;

    /** 商品Id */
    @Excel(name = "商品Id")
    private Long productId;

    /** 商品加入购物车时的价格 */
    @Excel(name = "商品加入购物车时的价格")
    private BigDecimal productPrice;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Integer productCount;

    /** 是否支持退款，1支持，0不支持。 */
    @Excel(name = "是否支持退款")
    private Integer withRefund;

    /** 选中状态 */
    @Excel(name = "选中状态 1选中 0未选")
    private Integer selected;

    /** 关联的商品 */
    private ShopProduct shopProduct;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setProductId(Long productId) 
    {
        this.productId = productId;
    }

    public Long getProductId() 
    {
        return productId;
    }

    public void setProductPrice(BigDecimal productPrice) 
    {
        this.productPrice = productPrice;
    }

    public BigDecimal getProductPrice() 
    {
        return productPrice;
    }
    public void setProductCount(Integer productCount)
    {
        this.productCount = productCount;
    }

    public Integer getProductCount()
    {
        return productCount;
    }

    public void setWithRefund(Integer withRefund) 
    {
        this.withRefund = withRefund;
    }

    public Integer getWithRefund() 
    {
        return withRefund;
    }

    public void setSelected(Integer selected) 
    {
        this.selected = selected;
    }

    public Integer getSelected() 
    {
        return selected;
    }

    public ShopProduct getShopProduct() {
        return shopProduct;
    }

    public void setShopProduct(ShopProduct shopProduct) {
        this.shopProduct = shopProduct;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("productId", getProductId())
            .append("productPrice", getProductPrice())
            .append("productCount", getProductCount())
            .append("withRefund", getWithRefund())
            .append("selected", getSelected())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .toString();
    }
}
